/*
* ============================================================================
*  Name        : cameraengine.cpp
*  Part of     : Symbian/S60 Camera Wrapper
*  Description : Camera engine class definition
*  Version     : %version: 2 %
*
* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://sam.zoy.org/wtfpl/COPYING for more details.
*
* You are welcome to, but not required to, contribute any modifications that
* improve stability, usability and/or feature set of the library back to
* Symbian/S60 Camera Wrapper project, as long as binary compatibility is
* retained. See https://projects.forum.nokia.com/camerawrapper for more info.
* ============================================================================
*/
//  CLASS HEADER
#include "cameraengine.h"

//  EXTERNAL INCLUDES
//#include <?include_file>

//  INTERNAL INCLUDES
#include "cameraengineprivate.h"


//  METHODS
EXPORT_C CCameraEngine* CCameraEngine::NewL( TInt aCameraHandle, 
    TInt aPriority, 
    MCameraEngineObserver* aObserver )
    {
    CCameraEngine* self = new (ELeave) CCameraEngine;
    CleanupStack::PushL( self );
    self->iPimpl = CCameraEnginePrivate::NewL( aCameraHandle, aPriority, aObserver );
    CleanupStack::Pop( self );
    return self;
    }

EXPORT_C CCameraEngine::~CCameraEngine()
    {
    delete iPimpl;
    }

EXPORT_C CCameraEngine::TCameraEngineState CCameraEngine::State() const
    {
    return (CCameraEngine::TCameraEngineState) iPimpl->State();
    }

EXPORT_C TBool CCameraEngine::IsCameraReady() const
    {
    return iPimpl->IsCameraReady();
    }

EXPORT_C TBool CCameraEngine::IsAutoFocusSupported() const
    {
    return iPimpl->IsAutoFocusSupported();
    }

EXPORT_C void CCameraEngine::CaptureL()
    {
    iPimpl->CaptureL();
    }

EXPORT_C void CCameraEngine::ReserveAndPowerOn()
    {
    iPimpl->ReserveAndPowerOn();
    }

EXPORT_C void CCameraEngine::ReleaseAndPowerOff()
    {
    iPimpl->ReleaseAndPowerOff();
    }

EXPORT_C void CCameraEngine::PrepareL( TSize& aCaptureSize,
    CCamera::TFormat aFormat )
    {
    iPimpl->PrepareL( aCaptureSize, aFormat );
    }

EXPORT_C void CCameraEngine::StartViewFinderL( TSize& aSize )
    {
    iPimpl->StartViewFinderL( aSize );
    }

EXPORT_C void CCameraEngine::StopViewFinder()
    {
    iPimpl->StopViewFinder();
    }

EXPORT_C void CCameraEngine::ReleaseViewFinderBuffer()
    {
    iPimpl->ReleaseViewFinderBuffer();
    }

EXPORT_C void CCameraEngine::ReleaseImageBuffer()
    {
    iPimpl->ReleaseImageBuffer();
    }

EXPORT_C void CCameraEngine::StartFocusL()
    {
    iPimpl->StartFocusL();
    }

EXPORT_C void CCameraEngine::FocusCancel()
    {
    iPimpl->FocusCancel();
    }

EXPORT_C void CCameraEngine::SupportedFocusRanges( TInt& aSupportedRanges ) const
    {
    iPimpl->SupportedFocusRanges( aSupportedRanges );
    }

EXPORT_C void CCameraEngine::SetFocusRange( TInt aFocusRange )
    {
    iPimpl->SetFocusRange( aFocusRange );
    }
    
EXPORT_C CCamera* CCameraEngine::Camera()
    {
    return iPimpl->Camera();
    }

EXPORT_C CCamera::CCameraAdvancedSettings* CCameraEngine::AdvancedSettings()
    {
    return iPimpl->AdvancedSettings();
    }
    
CCameraEngine::CCameraEngine()
    {
    }

EXPORT_C TInt CCameraEngine::CamerasAvailable()
  { 
  return CCamera::CamerasAvailable();
  }
  
EXPORT_C TInt CCameraEngine::MaxDigitalZoom()
  { 
  return iPimpl->MaxDigitalZoom();
  }
  
EXPORT_C TInt CCameraEngine::DigitalZoom()
  { 
  return iPimpl->DigitalZoom(); 
  }
  
EXPORT_C TInt CCameraEngine::AdjustDigitalZoom( TBool aTele )
  {
  return iPimpl->AdjustDigitalZoom( aTele );
  }
  
EXPORT_C TInt CCameraEngine::SupportedExposureModes() 
  {
  return iPimpl->SupportedExposureModes();
  }
  
EXPORT_C TInt CCameraEngine::Exposure()
  { 
  return iPimpl->Exposure();
  }
  
EXPORT_C TInt CCameraEngine::SetExposure( TInt aExposure )
  {
  return iPimpl->SetExposure( aExposure );
  }
  
EXPORT_C TInt CCameraEngine::SupportedFlashModes()
  {
  return iPimpl->SupportedFlashModes(); 
  }
  
EXPORT_C TInt CCameraEngine::Flash()
  {
  return iPimpl->Flash();
  }
  
EXPORT_C TInt CCameraEngine::SetFlash( TInt aFlash )
  {
  return iPimpl->SetFlash( aFlash );
  }

// End of file
